package edu.gmu.messages;
public class Host implements edu.gmu.middleware.Message{
    public EndPoint primaryHost;
    public EndPoint replicaHost;
    
//    public Host()
//    {
//    
//    }
//    
//    public Host( EndPoint primaryHost, EndPoint replicaHost )
//    {
//        this.primaryHost = primaryHost;
//        this.replicaHost = replicaHost;
//    }



    public void marshal(edu.gmu.streams.BlockOutputStream output) throws java.io.IOException{
        this.primaryHost.marshal(output);
        this.replicaHost.marshal(output);
    }

    public void unmarshal(edu.gmu.streams.BlockInputStream input) throws java.io.IOException{
        this.primaryHost = new EndPoint();
        this.primaryHost.unmarshal(input);
        this.replicaHost = new EndPoint();
        this.replicaHost.unmarshal(input);
    }
    
    public String toString()
    {
        return "primary = "+this.primaryHost + " replica = "+ this.replicaHost;
    }
}
